#include<stdio.h>
int main()
{
    double sum;
    int i,n,m;
    printf("please enter the value of n\n");
    scanf("%d",&n);
    for(i=1,m=1,sum=0;i<=n;i++)
    {
        sum+=m*(1.0/i);
        m=-m;
    }
    printf("the sum is %lf",sum);

}